﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="window_modules.aspx.cs" Inherits="He.Web.manage.weixin.window_modules" %>
<%@ Register Src="../_uc/head_list.ascx" TagPrefix="uc" TagName="head_list" %>
<%@ Register Src="../_uc/head.ascx" TagPrefix="uc" TagName="head" %>
<%@ Import Namespace="System.Collections.Generic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<uc:head runat="server" ID="uchead" />
<uc:head_list runat="server" ID="uchead_list" />
<style>
    ul.modules li {
    background: none repeat scroll 0 0 #EFEFEF;
    float: left;
    margin: 4px;
    padding: 10px;
    width: 27%;
}
ul.modules li div.mleft {
    float: left;
    width: 40%;
}
ul.modules li div.mright {
    float: right;
    text-align: right;
    width: 55%;
}
</style>
<script src="/plug/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
<script src="/plug/artDialog/plugins/iframeTools.js" type="text/javascript"></script>
<script type="text/javascript">
    function setCheck(id, title) {
        art.dialog.data("aid", id);
        art.dialog.data("atitle", title);
        art.dialog.close();
    }
</script>
</head>
<body style="background:#fff;padding:20px 20px;">
<div style="background:#fefbe4;border:1px solid #f3ecb9;color:#993300;padding:10px;margin-bottom:5px;">使用方法：点击“选中”直接返回对应模块外链代码，或者点击“详细”选择具体的内容外链</div>
<h4>请选择模块：</h4>
<ul class="modules">
  <li>
    <div class="mleft">微站首页</div>
    <div class="mright"><a style="margin-left:14px;" onclick="returnHomepage('<%=siteinfo.EnginePage %>')" href="###">选中</a></div>
    <div style="clear:both"></div>
  </li>
  <%
      List<He.Model.plug> pluglst = new He.BLL.config().LoadConfig<List<He.Model.plug>>(PlugXmlPath);
      foreach (He.Model.plug cl in pluglst)
      {
          if (cl.Lang ==CurrentLang &&cl.IsShow==true)
          {%>
  <li>
    <div class="mleft"><%=cl.Name %></div>
    <div class="mright"><a style="margin-left:14px;" onclick="returnHomepage('<%=siteinfo.EnginePage %>?p=<%=cl.Value %>')" href="###">选中</a></div>
    <div style="clear:both"></div>
  </li>
  <%}
      }
      List<He.Model.channel> channelList = new He.BLL.channel().GetModelList("is_lock=0 and lang='"+CurrentLang+"'");
      foreach (He.Model.channel channel in channelList)
      {%>
        <li>
        <div class="mleft"><%=channel.title%></div>
        <div class="mright"><a href="window_categorys.aspx?channel_id=<%=channel.id %>">详细</a><a style="margin-left:14px;" onclick="returnHomepage('<%=siteinfo.EnginePage %>?p=category&cid=<%=channel.id %>')" href="###">选中</a></div>
        <div style="clear:both"></div>
        </li>                
      <%}
       %>
  <div style="clear:both"></div>
</ul>
<script>
    var domid = art.dialog.data('domid');
    // 返回数据到主页面
    function returnHomepage(val) {
        var origin = artDialog.open.origin;
        var dom = origin.document.getElementById(domid);
        dom.value = val;
        setTimeout("art.dialog.close()", 100)
    }
</script>
</body>
</html>
